import Request from "./request.js";

// 商品详情
export function updateUserDataAPI(data) {
  return Request({
    url: "/api/user/updateData",
    data,
    method: "post",
  });
}
//
export function transferRecordAPI(data) {
  return Request({
    url: "/api/user/transferRecord",
    data,
    method: "get",
  });
}
// 提现
export function cashOutAPI1(data) {
  return Request({
    url: "/api/user/cashOut",
    data,
    method: "get",
  });
}

// 提现
export function cashOutAPI(data) {
  return Request({
    url: "/api/user/secondWithdrawal",
    data,
    method: "get",
  });
}

export function cashOutAPI2(data) {
  return Request({
    url: "/api/user/secondWithdrawalGP",
    data,
    method: "get",
  });
}

// 积分转换GTFY
export function convertAPI(data) {
  return Request({
    url: "/api/user/userSwitching",
    data,
    method: "get",
  });
}

// 分红
export function orderExtAPI(data) {
  return Request({
    url: "/api/user/orderExt",
    data,
    method: "get",
  });
}
// 订单详情
export function orderListAPI(data) {
  return Request({
    url: "/api/home/orders",
    data,
    method: "get",
  });
}
// 订单详情
export function teamListAPI(data) {
  return Request({
    url: "/api/user/team",
    data,
    method: "get",
  });
}
// 累计提现
export function totalWithdrawal(data) {
  return Request({
    url: "/api/user/totalWithdrawal",
    data,
    method: "get",
  });
}
/**
 * 修改接收验证码手机号
 * @param {*} data
 * @returns
 */
export const updateAuthCodePhone = (data) => {
  return Request({
    url: "/api/user/modifyMobileNumber",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 查询自己是不是运营中心
 * @param {*} data
 * @returns
 */
export const coreList = (data) => {
  return Request({
    url: "/api/core/list",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 查询运营中心变动记录列表
 * @param {*} data
 * @returns
 */
export const achievementRecordList = (data) => {
  return Request({
    url: "/api/achievementRecord/list",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 查询区域店铺
 * @param {*} data
 * @returns
 */
export const storeList = (data) => {
  return Request({
    url: "/api/store/list",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 查询区域店铺营业额
 * @param {*} data
 * @returns
 */
export const storeQueryRegionalTurnover = (data) => {
  return Request({
    url: "/api/store/queryRegionalTurnover",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 新增关注店铺
 * @param {*} data
 * @returns
 */
export const followStoreAdd = (data) => {
  return Request({
    url: "/api/followStore/add",
    data,
    method: "get",
    reqNewWay: true,
  });
};

/**
 * 取消关注店铺
 * @param {*} data
 * @returns
 */
export const followStoreCancel = (data) => {
  return Request({
    url: "/api/followStore/cancel",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 查询关注店铺列表
 * @param {*} data
 * @returns
 */
export const followStoreList = (data) => {
  return Request({
    url: "/api/followStore/list",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 查询关注店铺列表
 * @param {*} data
 * @returns
 */
export const followStoreQuerylist = (data) => {
  return Request({
    url: "/api/followStore/queryList",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 新增关注商品
 * @param {*} data
 * @returns
 */
export const followProductAdd = (data) => {
  return Request({
    url: "/api/followProduct/add",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 取消关注商品
 * @param {*} data
 * @returns
 */
export const followProductCancel = (data) => {
  return Request({
    url: "/api/followProduct/cancel",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 查询关注商品列表
 * @param {*} data
 * @returns
 */
export const followProductList = (data) => {
  return Request({
    url: "/api/followProduct/list",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 查询关注商品列表展示
 * @param {*} data
 * @returns
 */
export const followProductQuerylist = (data) => {
  return Request({
    url: "/api/followProduct/queryList",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 新增浏览记录
 * @param {*} data
 * @returns
 */
export const browseProductAdd = (data) => {
  return Request({
    url: "/api/browseProduct/add",
    data,
    method: "get",
    reqNewWay: true,
  });
};

/**
 * 删除浏览记录
 * @param {*} data
 * @returns
 */
export const browseProductCancel = (data) => {
  return Request({
    url: "/api/browseProduct/cancel",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 浏览记录列表
 * @param {*} data
 * @returns
 */
export const browseProductList = (data) => {
  return Request({
    url: "/api/browseProduct/list",
    data,
    method: "get",
    reqNewWay: true,
  });
};
/**
 * 展示浏览记录列表
 * @param {*} data
 * @returns
 */
export const browseProductQueryist = (data) => {
  return Request({
    url: "/api/browseProduct/queryList",
    data,
    method: "get",
    reqNewWay: true,
  });
};

export const zfbRecharge = (data) => {
  return Request({
    url: "/api/pay/zfb/recharge",
    data,
    method: "get",
    reqNewWay: true,
  });
};
